﻿<%--
 *  File:    AllFlowReports.jsp
 *  @Author: Jackwang
 *  Date:    2012/07/14
--%>

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java"%>
<%@ page import="java.util.*"%>
<%@ page import="org.apache.log4j.Category"%>

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom"%>
<% //--------------------------------------  setting logger --%>
<%
  	Category cat = Category.getInstance("jsp.ReportExportlog"); 

	//init param
	String strModuleName = "COM";
	String privilegeCode = "ALL";
	String strTableName = "v_report_exportlog";
	String contextPath = request.getContextPath();
%>
<% //--------------------------------------  include files list --%>
<%@ include file="/inc/FrmDefault.inc"%>
<%@ include file="/inc/PageDefault.inc"%>
<%@ include file="/inc/LocationDefault.inc"%>
<!--Security.inc" --权限
-->
<%@ include file="/rpt/ReportURL.inc"%>

<html>
<head>
<title>AllFlowReports.jsp</title>
<PageFlow:CheckPageFlow pageName="p_reportexportlog" />
<link rel="stylesheet"
	href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css"
	type="text/css">
<script language="JavaScript"
	src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/FuncLib.js"></script>
<!-- summaryPrepare -->
<%@ include file="/inc/SummaryDivision.inc"%>
<%
Vector searchresults = (Vector)pageContext.getAttribute("totalsummary");
if(searchresults == null) searchresults = new Vector();
HashMap UserInfo = (HashMap) session.getAttribute("userinfo");
%>
<script>
function page_summary(actionvalue,orderbyname)
{
  var editform = summaryPrepare(frm,actionvalue,orderbyname);
  editform.action = "ReportExportlog.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>";
  editform.target = "_self";
  isRunning = true;
  editform.submit();  
}
</script>
<!-- <meta http-equiv="refresh" content="5"> -->
</head>
<body>
<form name="frm" method="post" action="../../Dispatcher">
<%@ include file="/inc/PageLocation.inc"%>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
      <input type="hidden" name="pagename" value="p_reportexportlog">
      <input type="hidden" name="actionname">   
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0">
        <tr> 
          <td class="summary_top" colspan="3" ></td>
        </tr>
        <tr>
          <td>    
            <table border="0" cellspacing="0">    
            <%@ include file="/inc/SummarySearch.inc" %>  
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td> 
      <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellpadding="0" width="100%">
          <tr class="deepblue-left">
			<td width="2%" class="title_center"><%= "序号" %></td>
			<td width="16%" class="title_center"><a href="javascript:page_summary('orderby','flowname')"><%= "报表名称" %></a></td>
            <td width="8%" class="title_center"><a href="javascript:page_summary('orderby','begindate')"><%= "导出开始时间" %></a></td>
            <td width="8%" class="title_center"><a href="javascript:page_summary('orderby','enddate')"><%= "导出结束时间" %></a></td>
            <td width="16%" class="title_center"><a href="javascript:page_summary('orderby','status')"><%= label.getLabelName("L_Status") %></a></td>
            <td width="8%" class="title_center"><a href="javascript:page_summary('orderby','message')"><%= "信息" %></a></td>
            <td width="8%" class="title_center"><a href="javascript:page_summary('orderby','export_path')"><%= "操作" %></a></td>
              
       
</tr>
          <%
             Vector exportlogsummary1 = (Vector)pageContext.getAttribute("exportlogsummary");
             if(exportlogsummary1 == null)
             {
            	 exportlogsummary1 = new Vector();
             }
             String strClassType = new String("");   
             int i=0;
             String strChecked = "";
             boolean bHasChecked = false;
          %>   
          <logic:iterate id="exportlogsummary" collection="<%= exportlogsummary1 %>">
          <%
            if(i%2 == 1)
            {
              strClassType = "td-listrom";
            }else{                    
              strClassType = "none";
            }
            i++;
            HashMap exportMap = (HashMap)pageContext.getAttribute("exportlogsummary"); 
          %>            
          <tr class="<%=JspHelper.filterNull( strClassType )%>"> 
            <td class="title_center"><%=i %><input type="hidden" name="exportlogsummary" value="<custom:write name='exportlogsummary'  property='report_exportlogid'  nbsp='true'/>"/></td>
            <td><custom:write name="exportlogsummary"  property="flowname"    nbsp="true"/></td>
            <td class="title_center"><custom:write name="exportlogsummary" property="begindate" nbsp="true"/></td>
            <td class="title_center"><custom:write name="exportlogsummary"  property="enddate" nbsp="true"/></td>
            <td class="title_center"><custom:write name="exportlogsummary"  property="status" dictType="ExportFlowStatus" nbsp="true"/></td>
            <td class="title_center"><custom:write name="exportlogsummary"  property="message"  nbsp="true"/></td>
            <td class="title_center">
            &nbsp;
            <%
             Integer status=(Integer)exportMap.get("status");
             String exportPath=(String)exportMap.get("export_path");
             String messagelog=(String)exportMap.get("message");
			 if(status != null && 2 ==status.intValue() && exportPath != null && messagelog.equals("导出成功")){
            %>
             <a href="<%=newreportURL %>/fileDownload?id=<custom:write name='exportlogsummary'  property='report_exportlogid'  nbsp='true'/>">下载</a>
            <%} %>&nbsp;
            </td>
          </tr>
          </logic:iterate> 
        <%@ include file="/inc/SummaryAction.inc" %>
      </table>
    </td>
  </tr>

</table>
 </form>
</body>
</html>
